import React, { PureComponent } from 'react'
import { ScrollView, View, Text, StyleSheet } from 'react-native'
import { PullView } from '../../../../widgets'
import PropTypes from 'prop-types'
import screen from '../../../../utils/screen'

export default class extends PureComponent {
  static propTypes = {
    onPullRelease: PropTypes.func
  }
  render() {
    const { onPullRelease } = this.props
    let xxx = () => {}
    if(onPullRelease !== undefined) {
      xxx = onPullRelease
    }
    return (
      <PullView onPullRelease={xxx}>
        {this.props.children}
      </PullView>
    )
  }
}

const styles = StyleSheet.create({
  one: {
    flex: 2,
    marginLeft: screen.pxToDp(26)
  },
  two: {
    flex: 1
  },
})
